package com.shunbo.convenient.service.impl;

import com.shunbo.convenient.dao.AddressMapper;
import com.shunbo.convenient.dao.AddressMapper;
import com.shunbo.convenient.service.AddressService;
import com.shunbo.convenient.service.AddressService;
import com.shunbo.convenient.vo.Address;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author weizhuang
 */

@Service
@Transactional
public class AddressServiceImpl implements AddressService {

    @Resource
    private AddressMapper addressMapper;

    @Override
    public Integer save(Address obj) {
        return addressMapper.save(obj);
    }

    @Override
    public Integer update(Address obj) {
        return addressMapper.update(obj);
    }

    @Override
    public Integer delete(String obj) {
        return addressMapper.delete(obj);
    }

    @Override
    public Address findById(String obj) {
        return addressMapper.findById(obj);
    }

    @Override
    public List<Address> findAll(Address obj) {
        return addressMapper.findAll(obj);
    }
}
